package creationpattern.prototype;

public abstract class Shape implements Cloneable{
	private String id;
	protected String type;
	
	public Shape() {
		type = getClass().getSimpleName();
	}
	
	abstract void draw();
	
	public String getId() {
		return id;
	}
	public String getType() {
		return type;
	}
	public void setId(String id) {
		this.id = id;
	}
	
	public Shape clone() {
		Object clone = null;
		try {
			clone = super.clone();
		} catch(CloneNotSupportedException e) {
			e.printStackTrace();
		}
		
		return (Shape)clone;
	}
}
